package com.xfb.main;

import com.xfb.service.HelloService;
import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.ExtensionLoader;

/**
 * @Auther: Xing Fang Bin
 * @Date: 2021/09/10/17:13
 * @Description:
 */
public class AdaptiveHelloMain {
    public static void main(String[] args) {
        URL url = URL.valueOf("url://localhost?hello.service=human");
        HelloService adaptiveExtension = ExtensionLoader.getExtensionLoader(HelloService.class).getAdaptiveExtension();
        String sayHello = adaptiveExtension.sayHello(url);
        System.out.println(sayHello);

    }
}
